package com.wing.product.model.request;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * 托管订单（入库）
 */
@Schema(description="托管订单（入库）")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_order")
public class WarehouseOrderForm extends BaseEntity {
    @TableField(value = "order_code")
    @Schema(description="订单编号")
    private String orderCode;

    @TableField(value = "customer_id")
    @Schema(description="客户编号")
    private Long customerId;

    @TableField(value = "warehouse_user_id")
    @Schema(description="联系人")
    private Long warehouseUserId;

    @TableField(value = "phone")
    @Schema(description="电话")
    private String phone;

    @TableField(value = "mail")
    @Schema(description="邮箱")
    private String mail;

    @TableField(value = "store_time")
    @Schema(description="入库时间")
    private Date storeTime;

    @TableField(value = "total_quantity")
    @Schema(description="合计数量")
    private Double totalQuantity;

    @TableField(value = "total_weight")
    @Schema(description="合计总量")
    private Double totalWeight;

    @TableField(value = "total_price")
    @Schema(description="合计价格")
    private Double totalPrice;

    @TableField(value = "`status`")
    @Schema(description="订单状态，0 待受理 1 已受理 2 发货中 3 入库完成")
    private Integer status;

    @TableField(value = "`source`")
    @Schema(description="数据来源")
    private Integer source;

    private String customerName;
    private String customerNameId;
    private String userName;
    private Long userNameId;
    private List<ProductOrderDetailForm> productOrderDetail;

    public interface Add{}
    public interface Update{}

    @TableField(value = "charging_time")
    @Schema(description="入库时间")
    private Date chargingTime;

    private Double netWeight;
    private Double grossWeight;
}